package controller;

import entity.User;
import mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: UserController
 * Package:
 * Description:
 *
 * @Author 软件232班——欧阳昊淼
 * @Create 2025/3/25 9:15
 * @Version 17.0.2
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    UserMapper userMapper;

    @GetMapping("/list")
    public ResponseEntity list(){

        list<User> user = userMapper.selectAll();
        return ResponseEntity.ok(user);

    }
}
